package jvm;

/**
 * Created by duan lian on 2017-08-06.
 */
public class AccessStaticAndClassInit {
	private static class A {
		static {
			System.out.println("A");
		}

		final static int w=2;

		final static int x=y;
	}

	static int y=2;

	public static void main(String[] args) {
		// 不会初始化A
		System.out.println(A.w);
		// 会初始化A
		System.out.println(A.x);
	}
}
